#ifndef MODBUSSHOW_H
#define MODBUSSHOW_H

#include <QWidget>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonParseError>
#include <QJsonValue>
#include <mqtthandler.h>
#include <QLabel>
#include <QApplication>
#include <QPixmap>
#include <QCoreApplication>
#include "mybtn.h"
#include "globalval.h"
#define QPushButton_Fan_STYTLE_OPEN (QString("\
/*按钮普通态*/\
QPushButton\
{\
border-image:url(:/new/prefix1/fanon.png);\
    /*字体大小为10点*/\
    font-size:10pt;\
    /*字体颜色为白色*/\
    color:white;\
    font-family:MiSans;\
    /*背景颜色*/\
    background-color:rgb(210, 239, 255);\
    /*边框圆角半径为8像素*/\
    border-radius:8px;\
    border-top-left-radius:20px;\
    border-top-right-radius:20px;\
    border-bottom-left-radius:20px;\
    border-bottom-right-radius:20px;\
}\
/*按钮悬停态*/\
QPushButton:hover\
{\
border-image:url(:/new/prefix1/fanon.png);\
    /*背景颜色*/\
    background-color:rgb(63, 131, 219);\
}\
/*按钮按下态*/\
QPushButton:pressed\
{\
border-image:url(:/new/prefix1/fanon.png);\
    /*背景颜色*/\
background-color:rgb(164, 223, 255);\
    /*左内边距为3像素，让按下时字向右移动3像素*/\
    padding-left:3px;\
    /*上内边距为3像素，让按下时字向下移动3像素*/\
    padding-top:3px;\
}"))
#define QPushButton_Fan_STYTLE_CLOSE (QString("\
/*按钮普通态*/\
QPushButton\
{\
border-image:url(:/new/prefix1/fanoff (2).png);\
background-color:rgb(44, 115, 153);\
    /*字体大小为10点*/\
    font-size:10pt;\
  font-family:MiSans;\
    /*字体颜色为白色*/\
    color:white;\
    /*背景颜色*/\
    /*边框圆角半径为8像素*/\
    border-radius:8px;\
    border-top-left-radius:20px;\
    border-top-right-radius:20px;\
    border-bottom-left-radius:20px;\
    border-bottom-right-radius:20px;\
}\
/*按钮悬停态*/\
QPushButton:hover\
{\
border-image:url(:/new/prefix1/fanoff (2).png);\
    /*背景颜色*/\
    background-color:rgb(63, 131, 219);\
}\
/*按钮按下态*/\
QPushButton:pressed\
{\
border-image:url(:/new/prefix1/fanoff (2).png);\
    /*背景颜色*/\
    background-color:rgb(210, 239, 255);\
    /*左内边距为3像素，让按下时字向右移动3像素*/\
    padding-left:3px;\
    /*上内边距为3像素，让按下时字向下移动3像素*/\
    padding-top:3px;\
}"))
#define QPushButton_famen_STYTLE_OPEN (QString("\
/*按钮普通态*/\
QPushButton\
{\
border-image:url(:/new/prefix1/famenkai.png);\
    /*字体大小为10点*/\
    font-size:10pt;\
    /*字体颜色为白色*/\
    color:white;\
    font-family:MiSans;\
    /*背景颜色*/\
    background-color:rgb(210, 239, 255);\
    /*边框圆角半径为8像素*/\
    border-radius:8px;\
    border-top-left-radius:20px;\
    border-top-right-radius:20px;\
    border-bottom-left-radius:20px;\
    border-bottom-right-radius:20px;\
}\
/*按钮悬停态*/\
QPushButton:hover\
{\
border-image:url(:/new/prefix1/famenkai.png);\
    /*背景颜色*/\
    background-color:rgb(63, 131, 219);\
}\
/*按钮按下态*/\
QPushButton:pressed\
{\
border-image:url(:/new/prefix1/famenkai.png);\
    /*背景颜色*/\
background-color:rgb(164, 223, 255);\
    /*左内边距为3像素，让按下时字向右移动3像素*/\
    padding-left:3px;\
    /*上内边距为3像素，让按下时字向下移动3像素*/\
    padding-top:3px;\
}"))
#define QPushButton_famen_STYTLE_CLOSE (QString("\
/*按钮普通态*/\
QPushButton\
{\
border-image:url(:/new/prefix1/famenguan.png);\
background-color:rgb(44, 115, 153);\
    /*字体大小10点*/\
    font-size:10pt;\
  font-family:MiSans;\
    /*字体颜色为白色*/\
    color:white;\
    /*背景颜色*/\
    /*边框圆角半径为8像素*/\
    border-radius:8px;\
    border-top-left-radius:20px;\
    border-top-right-radius:20px;\
    border-bottom-left-radius:20px;\
    border-bottom-right-radius:20px;\
}\
/*按钮悬停态*/\
QPushButton:hover\
{\
border-image:url(:/new/prefix1/famenguan.png);\
    /*背景颜色*/\
    background-color:rgb(63, 131, 219);\
}\
/*按钮按下态*/\
QPushButton:pressed\
{\
border-image:url(:/new/prefix1/famenguan.png);\
    /*背景颜色*/\
    background-color:rgb(210, 239, 255);\
    /*左内边距为3像素，让按下时字向右移动3像素*/\
    padding-left:3px;\
    /*上内边距为3像素，让按下时字向下移动3像素*/\
    padding-top:3px;\
}"))
namespace Ui {
class ModbusShow;
}

class ModbusShow : public QWidget
{
    Q_OBJECT

public:
    explicit ModbusShow(QWidget *parent = 0);
    ~ModbusShow();
private slots:
    void dataUpSlot(const QByteArray &);
    void pushButtonjichuang();
    void pushButtonFan();
    void flashSlot();
private:
    Ui::ModbusShow *ui;
};

#endif // MODBUSSHOW_H
